package com.xbongbong.pro.script.pojo.dto;

import com.xbongbong.paas.toolbox.wrap.BaseDTO;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import javax.validation.constraints.DecimalMax;
import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotNull;

/**
 * 初始化脚本入参
 * @author feng.zheng
 * @version v1.0
 * @date 2019/1/17 14:49
 * @since v1.0
 */
@Getter
@Setter
@ToString
public class ScriptDTO extends BaseDTO {
    private static final long serialVersionUID = -7183333771997324851L;
    /**
     * 应用id
     */
    @NotNull(message = "{dto.msg.script.appId.NotNull}")
    private Long appId;
    /**
     * 菜单id
     */
    @NotNull(message = "{dto.msg.script.menuId.NotNull}")
    private Long menuId;

    private Long formId;
    /**
     * 是刷corpid=0数据还是刷进菜单里，0代表刷corpid=0数据，1代表刷解释
     */
    @NotNull(message = "{dto.msg.script.isAddExplain.NotNull}")
    @DecimalMin(value = "0", message = "{dto.msg.script.isAddExplain.DecimalMin}")
    @DecimalMax(value = "1", message = "{dto.msg.script.isAddExplain.DecimalMax}")
    private Integer isAddExplain;
}
